import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const PLATFORM: AppRouteRecordRaw = {
  path: '/platform',
  name: 'platform',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: 'menu.platform',
    requiresAuth: true,
    icon: 'icon-public',
    order: 10,
  },
  children: [
    {
      path: 'menuInfo', // The midline path complies with SEO specifications
      name: 'MenuInfo',
      component: () => import('@/views/platform/menu/index.vue'),
      meta: {
        locale: 'menu.platform.menu',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: 'roleInfo',
      name: 'RoleInfo',
      component: () => import('@/views/platform/role/index.vue'),
      meta: {
        locale: 'menu.platform.role',
        requiresAuth: true,
        roles: ['*'],
      },
    },
  ],
};

export default PLATFORM;
